规范、统一项目中相关属性及方法的命名方式。#1
Open
Andy0570 wants to merge 5 commits intoXHJCoder:masterfrom
Andy0570:master
Open
Conversation
本次提交并没有改变相关功能的实现原理,只是使项目使用的 Objective-C 代码更清晰,并尽量使其遵循规范。 修改内容大致如下: - 重命名相关属性、方法,命名习惯及原则尽量参考了官方开发文档的命名方式。 - 为 Block、枚举 类型增加了 XHStarRateView 前缀。 - 为 XHStarRateView 类设置指定初始化方法,其他初始化方法均调用指定初始化方法以维持调用链。参考《Effective Objective-C》第16条。 - 用类型常量代替 #define 预处理指令。参考: https://github.com/oa414/objc-zen-book-cn#常量 或参考《Effective Objective-C》第4条。 - userTapRateView: 方法中取消了 default 分支,当在 switch 语句里面使用一个可枚举的变量的时候,default 是不必要的。参考: https://github.com/oa414/objc-zen-book-cn#case语句 - #pragma mark 参考了 https://github.com/oa414/objc-zen-book-cn#pragma
- 增加 initWithCoder: 方法以支持 XIB 方式创建。
1. NIB 方式初始化视图时,_numberOfStar = 0 会导致设置图片frame 时除法运算中被除数为0导致的崩溃。 2. NIB 方式设置视图时,如果视图的宽度和高度不匹配(如高度值特别大,宽度值特别小)会导致添加的星星图片显示异常现象。
|
把你这个view加载tableview 的cell上之后就不显示内容了怎么解决 |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
本次提交并没有改变相关功能的实现原理,只是使项目的 Objective-C 代码更清晰,并尽量使其遵循规范。
修改内容大致如下: